package map;

import java.util.HashMap;
import java.util.Map;

public class Test1 {
    public static void main(String[] args) {
        String line="i love java,thinking in java! hello word!";
        Map<Character,Integer> map=new HashMap<>();
        for (int i=0;i<line.length();i++){
            char c=line.charAt(i);
            if (map.containsKey(c)){
                int a=map.get(c);
                map.put(c,a+1);
            }else {
                map.put(c,1);
            }
        }
        for (Map.Entry<Character,Integer> b:map.entrySet()){
            System.out.println(b.getKey()+":"+b.getValue());
        }
    }
}
